package homework3;

public class Chapter03 {
    public static void main(String[] args) {
        double h =10;
        double d =0;
        int i=0;
        for (;;){
            h*=0.8;
            d=d+h*2;
            i++;
            if (h<0.01)
                break;
        }
        System.out.println("运动轨迹为"+(d+10)+"米");
        System.out.println("碰撞"+i+"次后小于0.01");
    }
}
